TCR_SolutionHelper Code and Sample Calls

Access the TCR_SolutionHelper business rule by clicking Application > Tool > Business Rules > Dashboard Extender > TCR_SolutionHelper. Search for the code sections tagged with “#AuditLog” comments to review the Solution Audit code and calls to use this code.

Here is one example of a call in the TCR_SolutionHelper code that calls the Solution Audit functions to handle archiving an import Excel file:

The sample code text for the screen shot above is:

‘Archive the file

‘#AuditLog

Dim wfDesc As String ="Workflow: " & BRApi.Workflow.General.GetWorkflowUnitClusterPkDescription(si, si.WorkflowClusterPk)

Dim logMessage As New Text.StringBuilder

logMessage.Append(wfDesc)

For Each range As TableRangeContent In loadResults            

        logMessage.Append("; Table: " & range.TableName

        logMessage.Append(", Load Method: " & range.LoadMethod)

Next
'logMessage.Remove(logmessage.Length-2, 2)
Me.WriteFileArchiveLog(si, AuditLogGroupTypes.ImportFile.ToString, AuditLogObjectTypes.File.ToString, AuditLogActionTypes.Import.ToString, logMessage.ToString, DateTime.UtcNow, filePath)